<template>
  <div>
      <Syhd/>
      <div class="erji" v-for="(v,i) in arr" :key="i">
      <div class="left">
          <img :src="v.pic" alt="">
          <p>{{v.gname}}</p>
          <b>{{v.price1}}</b>
          <s>{{v.price2}}</s>
      </div>
      <div class="right">
        <img :src="v.ppic" alt="">
          <p>{{v.gname}}</p>
          <b>￥69.0</b>
          <s>188</s>
      </div>
      </div>
      <Db/>
  </div>
</template>

<script>
import {getlink} from "../../../api/getapi.js"
import Syhd from "../../../components/qiaoxiaodong/shiyong/syherder.vue"
import Db from "../../../components/qiaoxiaodong/shiyong/dibu.vue"




export default {
  components: {
    // 2.调用
    Syhd,Db
 },
 data() {
   return {
     arr:[],
   }
 },
 mounted(){
        getlink("/api/selectpj").then((ok)=>{
            console.log(ok.data);
            this.arr = ok.data;
            // console.log(this.arr);
            this.arr.reverse();
        })
    },
}
</script>

<style scoped>
  .erji {
    width: 100%;
    height: 5rem;
    display: flex;
    background: #f7f7f7;
    position: relative;
    top: 1.5rem;
  }
  img {
    width: 3.4rem;
    height: 3.4rem;
  }
  p {
    font-size: 0.3rem;
  }
  b {
    display: inline-block;
    font-size: 0.3rem;
    color: red;
    margin-top: 0.3rem;
  }
  s {
    color: #bdbdbd;
    margin-left: 0.1rem;
  }
  .left {
    margin-left: 0.2rem;
  }
  .right {
    margin-left: 0.3rem;
  }
</style>